OTCreateOptionString
Creates a string from a buffer containingTOption
structures.C INTERFACE
OTCreateOptionString (const char* prtclName, TOption** optPtr, void* bufEnd, char* string, size_t stringSize);C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
prtclName
- A constant specifying the name of the protocol for this option or options.
optPtr
- A pointer to a pointer to a buffer containing one or more
TOption
structures.bufEnd
- A pointer to the first byte of memory past the last option.
string
- A pointer to a buffer where the string is to be stored. You must allocate this buffer.
stringSize
- The length of the buffer where the string is to be stored. You must specify this value.
DESCRIPTION
You can use theOTCreateOptionString
function to parse through the options buffer returned by theret
parameter to theOTOptionMangement
function and create a string specifying option values that you can display.This function is supplied solely as a debugging aid. You should not include the function in a production version of your application because there is no provision made for localizing string information.
SEE ALSO
You obtain the buffer to be converted from theret
parameter to theOTOptionManagement
function (page 5-34). Listing 5-3 on page 5-24 shows how you use theOTCreateOptionString
function.You can reverse the procedure and build an options buffer from a string by using the
OTCreateOptions
function (page 5-38).